package com.feng.zhihao.apigeteway.controller.interfaces;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.feng.zhihao.apigeteway.controller.BaseController;
import com.feng.zhihao.apigeteway.dao.interfaces.ProjectInfoDao;
import com.feng.zhihao.apigeteway.page.RestData;
import com.feng.zhihao.apigeteway.util.DBUtil;
import com.feng.zhihao.apigeteway.util.SQLUtil;
import com.xiaoleilu.hutool.log.LogFactory;

@RestController
@RequestMapping("/project")
public class ProjectInfoController extends BaseController{
	com.xiaoleilu.hutool.log.Log logger = LogFactory.get();
	
	@Autowired
	ProjectInfoDao projectInfoDao;
	
	@RequestMapping("getMyProject.do")
	public RestData getMyProject(@RequestParam("page")int page,@RequestParam("size")int size) throws SQLException{
		String channel=getCurrentUser().getChannelInfo().getChannelId();
		return new RestData(DBUtil.page(SQLUtil.getSELECT_CHANNEL_PROJECT_LIST(), page, size,channel,channel,channel,channel,channel));
	}
	
}
